import { lazy } from 'react';
import { RouteObject, Navigate } from 'react-router-dom';
import Announcement from '../pages/Announcement';
import AnnouncementDetail from '../pages/Announcement/detail';
import Message from '../pages/Message';
import PreAcceptance from '../pages/PreAcceptance';
import PreAcceptanceNotice from '../pages/PreAcceptance/Notice';
import PreAcceptanceProcess from '../pages/PreAcceptance/Process';
import PreAcceptanceFeedback from '../pages/PreAcceptance/Feedback';
import FormalAcceptance from '../pages/FormalAcceptance';
import FormalAcceptanceNotice from '../pages/FormalAcceptance/Notice';
import FormalAcceptanceMaterial from '../pages/FormalAcceptance/Material';
import FormalAcceptanceReform from '../pages/FormalAcceptance/Reform';
import SummaryReform from '../pages/Summary/Reform';
import SummaryEvaluation from '../pages/Summary/Evaluation';
import SummaryFiling from '../pages/Summary/Filing';
import ProcessList from '../pages/ProcessList';
import PreAcceptanceNoticeDetail from '../pages/PreAcceptance/NoticeDetail';
import FormalAcceptanceNoticeDetail from '../pages/FormalAcceptance/NoticeDetail';
import PreAcceptanceFeedbackDetail from '../pages/PreAcceptance/FeedbackDetail';
import PreAcceptanceFeedbackReform from '../pages/PreAcceptance/FeedbackReform';
import FormalAcceptanceProcess from '../pages/FormalAcceptance/Process';
import FormalAcceptanceReformDetail from '../pages/FormalAcceptance/ReformDetail';
import FormalAcceptanceReformResult from '../pages/FormalAcceptance/ReformResult';
import SummaryReformDetail from '../pages/Summary/ReformDetail';
import SummaryFilingDetail from '../pages/Summary/FilingDetail';

const Home = lazy(() => import('../pages/Home'));
const Login = lazy(() => import('../pages/Login'));
const Profile = lazy(() => import('../pages/Profile'));
const Register = lazy(() => import('../pages/Login/Register'));
const ForgotPassword = lazy(() => import('../pages/Login/ForgotPassword'));

export const routes: RouteObject[] = [
  {
    path: '/login',
    element: <Login />
  },
  {
    path: '/register',
    element: <Register />
  },
  {
    path: '/forgot-password',
    element: <ForgotPassword />
  },
  {
    path: '/home',
    element: <Home />
  },
  {
    path: '/profile',
    element: <Profile />
  },
  {
    path: '/announcement',
    element: <Announcement />
  },
  {
    path: '/announcement/:id',
    element: <AnnouncementDetail />
  },
  {
    path: '/message',
    element: <Message />
  },
  {
    path: '/pre-acceptance',
    element: <PreAcceptance />
  },
  {
    path: '/pre-acceptance/notice',
    element: <PreAcceptanceNotice />
  },
  {
    path: '/pre-acceptance/process',
    element: <PreAcceptanceProcess />
  },
  {
    path: '/pre-acceptance/feedback',
    element: <PreAcceptanceFeedback />
  },
  {
    path: '/formal-acceptance',
    element: <FormalAcceptance />
  },
  {
    path: '/formal-acceptance/notice',
    element: <FormalAcceptanceNotice />
  },
  {
    path: '/formal-acceptance/material',
    element: <FormalAcceptanceMaterial />
  },
  {
    path: '/formal-acceptance/reform',
    element: <FormalAcceptanceReform />
  },
  {
    path: '/formal-acceptance/process',
    element: <FormalAcceptanceProcess />
  },
  {
    path: '/summary/reform',
    element: <SummaryReform />
  },
  {
    path: '/summary/evaluation',
    element: <SummaryEvaluation />
  },
  {
    path: '/summary/filing',
    element: <SummaryFiling />
  },
  {
    path: '/process-list',
    element: <ProcessList />
  },
  {
    path: '/pre-acceptance/notice/:id',
    element: <PreAcceptanceNoticeDetail />
  },
  {
    path: '/formal-acceptance/notice/:id',
    element: <FormalAcceptanceNoticeDetail />
  },
  {
    path: '/pre-acceptance/feedback/detail/:id',
    element: <PreAcceptanceFeedbackDetail />
  },
  {
    path: '/pre-acceptance/feedback/reform/:id',
    element: <PreAcceptanceFeedbackReform />
  },
  {
    path: '/formal-acceptance/reform/detail/:id',
    element: <FormalAcceptanceReformDetail />
  },
  {
    path: '/formal-acceptance/reform/result/:id',
    element: <FormalAcceptanceReformResult />
  },
  {
    path: '/summary/reform/detail/:id',
    element: <SummaryReformDetail />
  },
  {
    path: '/summary/filing/detail/:id',
    element: <SummaryFilingDetail />
  },
  {
    path: '/',
    element: <Navigate to="/home" replace />
  }
]; 